<?php

namespace Xin\Hint\Facades;

use Closure;
use Hyperf\Context\ApplicationContext;
use Hyperf\Di\Container;
use Xin\Hint\HintManager;
use Xin\Support\Facade;

/**
 * @method HintManager shouldUseApi() static
 * @method HintManager shouldUseWeb() static
 * @method mixed success($msg, $url = null, $data = null, array $extend = []) static
 * @method mixed error($msg, $code = null, $url = null, array $extend = []) static
 * @method mixed alert($msg, $code = null, $url = null, array $extend = []) static
 * @method mixed result($data = [], array $extend = []) static
 * @method mixed outputSuccess($msg, $url = null, $data = null, array $extend = [], callable $callback = null) static
 * @method mixed outputError($msg, $code = null, $url = null, array $extend = [], callable $callback = null) static
 * @method mixed outputAlert($msg, $code = null, $url = null, array $extend = [], callable $callback = null) static
 * @see \Xin\Hint\Contracts\Factory
 * @see \Xin\Hint\Contracts\HintHandler
 */
class Hint extends Facade
{

	/**
	 * 获取当前Facade对应类名（或者已经绑定的容器对象标识）
	 *
	 * @access protected
	 * @return string
	 */
	protected static function getFacadeClass()
	{
		return 'hint';
	}

	/**
	 * 获取组件的注册名称。
	 *
	 * @return string
	 */
	protected static function getFacadeAccessor()
	{
		return 'hint';
	}

	/**
	 * @return Closure
	 */
	protected static function getFacadeAccessorResolver()
	{
		return function () {
			return new HintManager();
		};
	}

}
